package com.bite.friend.controller.user;


import com.bite.common.core.controller.BaseController;
import com.bite.common.core.domain.R;
import com.bite.common.core.domain.TableDataInfo;
import com.bite.common.core.domain.dto.BaseQueryTableDTO;
import com.bite.friend.service.user.IUserMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/message")
public class UserMessageController extends BaseController {

    @Autowired
    private IUserMessageService userMessageService;

    @GetMapping("/list")
    public TableDataInfo list(BaseQueryTableDTO queryTableDTO) {
//        startPage(queryTableDTO);
        return userMessageService.list(queryTableDTO);
    }

    @DeleteMapping("/del")
    public R<Void> del(Long textId) {
        return toR(userMessageService.del(textId));
    }
}
